package com.magicserver.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import java.util.Properties;

public final class StringManager {
	
	//-----------------------------------------------------------------Variables
	private static StringManager stringManager=new StringManager();
	protected String path=null;
	private static Properties properties=new Properties();
	
	//----------------------------------------------------------------------------menthods
	public String getString(String key){
		return properties.getProperty(key);
	}
	
	public static StringManager getManager(String path){
		InputStream in;
		try {
			in = new FileInputStream(new File(path));
			properties.load(in);
			in.close();
		} catch (FileNotFoundException e1) {
			e1.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return stringManager;
	}
	
	
	private StringManager(){
		 
	}
}
